<template>
	<a-button class="editable-add-btn" type="primary" style="margin-bottom: 8px;float: right;"
		@click="handleAdd">Add</a-button>
	<!-- <a-table :dataSource="dataSource" :columns="columns" /> -->
	<a-table :dataSource="dataSource" :columns="columns" /> 
</template>
<script setup>
import {
	ref,
	onMounted,
} from 'vue'
const columns = ref([{
	title: '网关',
	dataIndex: 'name',
	key: 'name',
},
{
	title: '在线',
	dataIndex: 'online',
	key: 'online',
},
{
	title: '地址',
	dataIndex: 'address',
	key: 'address',
},
])
const dataSource = ref([{
	key: '1',
	name: 'ASCG123456789',
	online: '在线',
	address: '西湖区湖底公园1号',
},
{
	key: '2',
	name: 'ASCG123456789',
	online: '在线',
	address: '西湖区湖底公园1号',
},
])
const jsonTreeData = ref(
	[{
		"id": "工厂测试",
		"name": "工厂测试",
		"type": '客户',
		"children": [
			{
				"id": "工厂测试.车间",
				"name": "车间",
				"type": '工程',
				"children": [
					{
						"id": "工厂测试.车间.学校机",
						"name": "学校机",
						"type": '现场',
						"children": [
							{
								"id": "工厂测试.车间.学校机.Dev1",
								"name": "Dev1",
							},
							{
								"id": "工厂测试.车间.学校机.Dev2",
								"name": "Dev2",
							}
						]
					},
					{
						"id": "工厂测试.车间.联影",
						"name": "联影",
						"type": '现场',
						"children": [
							{
								"id": "工厂测试.车间.联影.Dev1",
								"name": "Dev1",
							},
							{
								"id": "工厂测试.车间.联影.Dev2",
								"name": "Dev2",
							}
						]
					},
				]
			},
			{
				"id": "工厂测试.氟泵",
				"name": "氟泵",
				"type": '工程',
				"children": [
					{
						"id": "工厂测试.氟泵.实验室",
						"name": "实验室",
						"type": '现场',
						"children": [
							{
								"id": "工厂测试.氟泵.实验室.Dev1",
								"name": "Dev1",
							},
							{
								"id": "工厂测试.氟泵.实验室.Dev2",
								"name": "Dev2",
							}
						]
					},
					{
						"id": "工厂测试.氟泵.户外长运",
						"name": "户外长运",
						"type": '现场',
						"children": [
							{
								"id": "工厂测试.氟泵.户外长运.Dev1",
								"name": "Dev1",
							},
							{
								"id": "工厂测试.氟泵.户外长运.Dev2",
								"name": "Dev2",
							}
						]
					},
				]
			},
		]
	}])
onMounted(() => {

});
</script>
<style scoped></style>